<template>
  <div class="filter-item">
    <el-date-picker
      v-model="startTime"
      type="datetime"
      placeholder="开始日期"
      style="width:180px;"
      align="right"
      size="mini"
      @change="success"
    ></el-date-picker>
    <span class="filter-item" style="color:#dfe6ec">-</span>
    <el-date-picker
      v-model="endTime"
      type="datetime"
      placeholder="结束日期"
      style="width:180px;"
      align="right"
      size="mini"
      @change="success"
    ></el-date-picker>
  </div>
</template>
<script>
export default {
  data() {
    return {
      startTime: undefined,
      endTime: undefined
    };
  },
  methods: {
    success() {
      this.$emit("success", this.startTime, this.endTime);
    }
  }
};
</script>